global  class HitachWebservice {
    

    webService static String makeGetCallout(String httpTriggerURL, String basicAuth, String renrakuhyoNo) {
        
        String strRet = '';
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        Blob credential = Blob.valueOf(basicAuth);    // ← DSC基本認証情報

        request.setEndpoint(httpTriggerURL);    // ← HTTPトリガー用URL
        request.setHeader('Authorization', 'Basic ' + EncodingUtil.base64Encode(credential));
        request.setHeader('Accept', 'application/json');
        request.setHeader('Content-type', 'application/json');
        request.setMethod('POST');
        request.setBody('{"renrakuhyo_no":"' + renrakuhyoNo + '"}');    // ← マイカ連携用の連絡票No

        try{
            HttpResponse response = http.send(request);
            Integer status = response.getStatusCode();
            strRet = status.format() + response.getBody();
            return strRet;
            
        }catch(Exception e){
            strRet = e.getMessage();
            return strRet;
        }
    }
}